Skip to content

Remap stb_vorbis malloc/free calls to RL_MALLOC/RL_FREE#5765

Closed
nadav78 wants to merge 4 commits into
raysan5:masterfrom
nadav78:master
Closed

Remap stb_vorbis malloc/free calls to RL_MALLOC/RL_FREE#5765
nadav78 wants to merge 4 commits into
raysan5:masterfrom
nadav78:master

Conversation

@nadav78
Copy link
Copy Markdown
Contributor

@nadav78 nadav78 commented Apr 15, 2026

Implements the TODO in src/raudio.c. Adds STB_VORBIS_MALLOC and STB_VORBIS_FREE hooks to stb_vorbis.c, consistent with the named macro pattern used by dr_wav, dr_mp3, and qoa. Previous PR #5763 used a raw #define malloc approach which conflicted with stb_vorbis's internal stdlib.h include.

nadav78 and others added 4 commits April 16, 2026 00:46
@raysan5
Copy link
Copy Markdown
Owner

raysan5 commented Apr 15, 2026

@nadav78 I'm afraid stb_vorbis.c is an external library and it shouldn't be modified here but in original repo.

@raysan5 raysan5 closed this Apr 15, 2026
@nadav78
Copy link
Copy Markdown
Contributor Author

nadav78 commented Apr 15, 2026

My bad! Is there a preferred approach here? It seems like this would indeed need to be fixed upstream since stb_vorbis doesn't expose allocator hooks like the other libraries.

@raysan5
Copy link
Copy Markdown
Owner

raysan5 commented Apr 15, 2026

@nadav78 I'm afraid there are not many options without modifying stb_vorbis library, your first approach looked good but it generated some issues...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants